﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Resources;
using System.Threading;
using System.Globalization;
using System.Reflection;
    

namespace AIniciacao.Lib.Resources
{
    public static class AIniciacaoResourceManager
    {
        
        public static ResourceManager resourceManager;
        public static string ptBRCulture = "pt-BR";
        public static string enUSCulture = "en-US";

        public static string getProperty(string propertyName)
        {
            if (Settings.CultureInfo == null)
                Settings.CultureInfo = new CultureInfo(ptBRCulture);
            Thread.CurrentThread.CurrentUICulture = Settings.CultureInfo;
            if(resourceManager == null)
                resourceManager = new ResourceManager("AIniciacao.Lib.Resources.messages", Assembly.GetExecutingAssembly());
            CultureInfo culture = new CultureInfo(ptBRCulture);
          
            return resourceManager.GetString(propertyName);
        }
        
    }
}
